﻿using System;
using System.Web.UI;
using QzEbook.BaseView;
using QzEbook.AccessObject;

namespace qzEbook.webUI
{
    public partial class updatePage : UserPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.checkUser();

            string pid = Request["Pid"] as string;
            if (pid == null)
            {
                Response.StatusCode = 500;
                Response.Write("请输入Page的id号");
                Response.End();
            }


            BookPage page = new BookPage();
            page.PageId = int.Parse(pid);
            page.Title= Request["title"].ToString();
            page.Index = int.Parse(Request["index"].ToString());

            bool action = page.update();

            Response.Clear();
            if (action)
            {
                Response.Write("更新成功");
            }
            else
            {
                Response.Write("失败");
            }
            Response.End();

        }
    }
}